package com.jdy.haoduoaiteacher.view;

import android.annotation.SuppressLint;
import android.view.MotionEvent;
import android.view.View;

import com.ycsj.goldmedalnewconcept.R;


public class CustomTouchListener implements View.OnTouchListener {
  @SuppressLint("ClickableViewAccessibility")
  @Override
  public boolean onTouch(View view, MotionEvent motionEvent) {
    switch (motionEvent.getAction()) {
    case MotionEvent.ACTION_DOWN:
      // view.setBackgroundColor(0xff48c4c6);
      view.setBackgroundResource(R.drawable.ellipse_shape_pressed);
      break;
    case MotionEvent.ACTION_CANCEL:
    case MotionEvent.ACTION_UP:
      view.setBackgroundResource(R.drawable.ellipse_shape);
      // view.setBackgroundColor(0xffc2c2c2);
      break;
    }
    return false;
  }
}